﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace PankowGame13
{
    class LadderTile:Tile
    {
        public bool isDown { get; set; }

        public LadderTile(string ladderPicture, Vector2 ladderLocation, int textureSize, bool down, ContentManager content)
        {
            tileTexture = content.Load<Texture2D>(ladderPicture);
            tileLocation = ladderLocation;
            tileSize = textureSize;
            canPass = true;
            isDown = down;
            isActive = false;
            tileRect = new Rectangle((int)tileLocation.X, (int)tileLocation.Y, textureSize, textureSize);
        }

        public void Update(ContentManager content)
        {
            if (isActive)
            {
                if (isDown)
                {
                    tileTexture = content.Load<Texture2D>(@"Ladder down Floor");
                }
                else
                {
                    tileTexture = content.Load<Texture2D>(@"Ladder up Floor");
                }
            }
        }
    }
}
